package xdu.lz.stage2_design_pattern.chapter2_single_pattern;

//饿汉模式：如果长时间不用这个对象，但是已经被创建了，造成资源浪费
//即不能懒加载
public class Singleton1 {

    private static final Singleton1 instance = new Singleton1();

    private Singleton1(){
        //empty
    }
    public static Singleton1 getInstance(){
        return instance;
    }
}
